﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RicciWebsite
{
    public partial class _default : RicciWebsite.Pages.PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string lanstring = Request.QueryString["lan"];
            if (!string.IsNullOrEmpty(lanstring))
            {
                switch (lanstring)
                {
                    case "1":
                        RicciWebsite.Common.SetLanguage(Common.Language.SampleChinese);
                        break;
                    case "2":
                        RicciWebsite.Common.SetLanguage(Common.Language.TraditionalChinese);
                        break;
                    case "3":
                        RicciWebsite.Common.SetLanguage(Common.Language.English);
                        break;
                    default:
                        RicciWebsite.Common.SetLanguage(Common.Language.English);
                        break;
                }

                Response.Redirect(Request.UrlReferrer.PathAndQuery);
            }

            RicciWebsite.masterpage._default m = this.Master as RicciWebsite.masterpage._default;
            m.TabIndex = 1;
                        
        }
    }
}
